<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="_header_include::frag(~{::title},~{::style},~{})">
    <title>后台管理系统</title>
    <style>
        /*页面不可复制*/
        html,body{
            -moz-user-select:none; /* Firefox私有属性 */
            -webkit-user-select:none; /* WebKit内核私有属性 */
            -ms-user-select:none; /* IE私有属性(IE10及以后) */
            -khtml-user-select:none; /* KHTML内核私有属性 */
            -o-user-select:none; /* Opera私有属性 */
            user-select:none; /* CSS3属性 */
        }
        .el-table__expand-icon {            
            color: red;
            float: left;
        }
        .el-table__expand-icon .el-icon-arrow-right:before{
            font-weight: bold;
            font-size: 18px;
        }
        /*.el-table__row--level-1 .el-checkbox{display: none;}*/
    </style>
</head>
<body>
<div id="clueManage" class="clueManage mainPadding" style="display: none;">
    <el-breadcrumb separator="/" class="elBreadcrumb marginB20">
        <el-breadcrumb-item>Home</el-breadcrumb-item>
        <el-breadcrumb-item>商务管理</el-breadcrumb-item>
        <el-breadcrumb-item>客户管理（商务）</el-breadcrumb-item>
    </el-breadcrumb>
    <el-row class="marginB20">
        <shiro:hasPermission
                name="business:busCustomerManager:allocation">
            <el-button type="primary" @click="toAllocationClue">分发资源</el-button>
        </shiro:hasPermission>
        <shiro:hasPermission name="business:busCustomerManager:allocation">
            <el-button type="success" @click="toTransferClue">外调经理</el-button>
        </shiro:hasPermission>
        <shiro:hasPermission name="business:busCustomerManager:cancelVisit">
            <el-button type="warning" @click="notVisit">标记未到访</el-button>
        </shiro:hasPermission>
        <shiro:hasPermission name="business:busCustomerManager:importVisitPer">
            <el-button v-if="importVisitPerFlag" icon="el-icon-download" type="warning" @click="importVisitPer">导出到访业绩</el-button>
            <el-button v-else icon="el-icon-loading" type="warning" disabled>到访业绩导出中</el-button>
        </shiro:hasPermission>
    </el-row>
    <div class="mainSearchBg">
        <div class="mainSearchFormBox">
            <el-form :inline="true" class="demo-form-inline mainSearchForm" :model="searchForm" ref="searchForm">
                <el-form-item label="到访状态:" prop="visitStatus">
                    <el-select v-model="searchForm.visitStatus" clearable placeholder="到访状态">
                        <el-option v-for="item in visitStatusOptions" :key="item.value" :label="item.name"
                                   :value="item.value"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="客户姓名:" prop="cusName">
                    <el-input v-model="searchForm.cusName" placeholder="客户姓名"></el-input>
                </el-form-item>
                <el-form-item label="签约状态:" prop="isSign">
                    <el-select v-model="searchForm.isSign" clearable placeholder="签约状态" :disabled="disabledIsSign">
                        <el-option v-for="item in isSignOptions" :key="item.value" :label="item.name"
                                   :value="item.value"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="邀约来访时间:">
                    <el-date-picker v-model="searchForm.startReserveTime" format="yyyy-MM-dd HH:mm" type="datetime"
                                    placeholder="选择日期"></el-date-picker>
                </el-form-item>
                <el-form-item label="—" class="widthauto">
                    <el-date-picker v-model="searchForm.endReserveTime" format="yyyy-MM-dd HH:mm" type="datetime"
                                    placeholder="选择日期"></el-date-picker>
                </el-form-item>
                <el-row v-show="isShow">
                    <el-form-item label="考察项目:" prop="tasteProjectId">
                        <el-select v-model="searchForm.tasteProjectId" clearable placeholder="考察项目" filterable>
                            <el-option v-for="item in projectOptions" :key="item.id" :label="item.projectName"
                                       :value="item.id"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="客户读取状态:" prop="isView">
                        <el-select v-model="searchForm.isView" clearable placeholder="客户读取状态">
                            <el-option v-for="item in isViewOptions" :key="item.value" :label="item.name"
                                       :value="item.value"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="电销组:" prop="teleGorupId">
                        <el-select v-model="searchForm.teleGorupId" clearable @change="getSaleList" placeholder="电销组"
                                   filterable>
                            <el-option v-for="item in teleGorupOptions" :key="item.id" :label="item.name"
                                       :value="item.id"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="提交邀约时间:">
                        <el-date-picker v-model="searchForm.startTime" format="yyyy-MM-dd HH:mm" type="datetime"
                                        placeholder="选择日期"></el-date-picker>
                    </el-form-item>
                    <el-form-item label="—" class="widthauto">
                        <el-date-picker v-model="searchForm.endTime" format="yyyy-MM-dd HH:mm" type="datetime"
                                        placeholder="选择日期"></el-date-picker>
                    </el-form-item>
                    <el-form-item label="电销顾问:" prop="teleSaleId">
                        <el-select v-model="searchForm.teleSaleId" clearable placeholder="电销顾问" filterable>
                            <el-option v-for="item in teleSaleOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="开店省份:" prop="province">
                        <el-select v-model="searchForm.province" clearable placeholder="开店省份" filterable>
                            <el-option v-for="item in provinceOptions" :key="item.name" :label="item.name"
                                       :value="item.name"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="商务组:" prop="busGroupId">
                        <el-select v-model="searchForm.busGroupId" clearable @change="getBusSaleList(1)"
                                   placeholder="商务组" filterable :disabled="isSWZDisabled">
                            <el-option v-for="item in busGroupOptions" :key="item.id" :label="item.name"
                                       :value="item.id"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="接收邀约时间:">
                        <el-date-picker
                                v-model="searchForm.startAllocationTime"
                                format="yyyy-MM-dd HH:mm"
                                type="datetime" placeholder="选择日期"></el-date-picker>
                    </el-form-item>
                    <el-form-item label="—" class="widthauto">
                        <el-date-picker
                                v-model="searchForm.endAllocationTime"
                                format="yyyy-MM-dd HH:mm"
                                type="datetime" placeholder="选择日期"></el-date-picker>
                    </el-form-item>
                    <el-form-item label="商务总监:" prop="busDirectorId">
                        <el-select v-model="searchForm.busDirectorId" clearable placeholder="商务总监" filterable>
                            <el-option v-for="item in busDirectorOptions" :key="item.id" :label="item.name"
                                       :value="item.id"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="商务经理:" prop="busSaleId">
                        <el-select v-model="searchForm.busSaleId" clearable placeholder="商务经理" filterable>
                            <el-option v-for="item in busSaleOptions" :key="item.id" :label="item.name"
                                       :value="item.id"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="是否补齐尾款:">
                        <el-select v-model="searchForm.isTailMoney" placeholder="是否补齐尾款" clearable :disabled="disabledIsTailMoney">
                            <el-option v-for="item in isTailMoneyArr" :key="item.value" :label="item.label"
                                       :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="资源Id:">
                        <el-input v-model="searchForm.clueId" placeholder="请输入资源Id"></el-input>
                    </el-form-item>
                    <el-form-item label="联系方式:">
                        <el-input v-model="searchForm.linkPhone" placeholder="请输入联系方式"></el-input>
                    </el-form-item>
                    <el-form-item label="签约单编号:">
                        <el-input v-model="searchForm.signNo" placeholder="签约单编号"></el-input>
                    </el-form-item>
                </el-row>
                <div class="mainSearchBtnBox">
                    <el-button icon="el-icon-search" type="primary" @click="searchTable()" class="searchBtn">搜索
                    </el-button>
                    <!-- <el-button type="info" class="searchBtn">取消</el-button> -->
                    <span style="color: #5c6be8;cursor: pointer;margin:0 10px;" @click="toogleClick"><span
                            v-if="isShow">收起</span><span v-else>展开更多</span><i
                            :class="{'greycolor paddingL6 el-icon-arrow-up':isShow,'greycolor paddingL6 el-icon-arrow-down':!isShow}"></i></span>
                </div>
            </el-form>
        </div>
        <el-row>
            <el-table ref="multipleTable" tooltip-effect="dark"
                    border @row-dblclick="showCustomerDetail"
                    @selection-change="handleSelectionChange" style="width: 100%"
                    :data="dataTable" @sort-change="sort_change"
                    row-key="appiontmentId"
                    :tree-props="{children: 'childrens'}">
                <el-table-column align="center" type="selection" label="全选" width="55"></el-table-column>
                <el-table-column align="center" type="index" width="55" label="序号">
                    <template slot-scope="scope">
                        <span v-if="scope.row.index">{{scope.row.index}}</span>
                    </template>
                </el-table-column>                            
                <el-table-column align="center" prop="reserveTime" sortable label="邀约来访时间" :formatter="dateFormat" width="150"></el-table-column>
                <el-table-column align="center" prop="visitStatus" label="到访状态" :formatter="transformVisit" width="90"></el-table-column>
                <el-table-column align="center" prop="isSign" label="签约状态" :formatter="transformSign" width="80"></el-table-column>
                <el-table-column align="center" prop="busSaleName" label="商务经理" width="120"></el-table-column>
                <el-table-column align="center" prop="teleGorupName" label="电销组" width="100"></el-table-column>
                <el-table-column align="center" prop="teleDirectorName" label="电销总监" width="120"></el-table-column>
                <el-table-column align="center" prop="cusName" label="客户姓名" width="130"></el-table-column>
                <el-table-column align="center" prop="linkPhone" label="联系方式" width="100"></el-table-column>
                <el-table-column align="center" prop="tasteProjectId" label="考察项目" :formatter="transformProject" width="130"></el-table-column>
                <el-table-column align="center" prop="province" label="开店省份" width="100"></el-table-column>
                <el-table-column align="center" prop="city" label="开店城市" width="100"></el-table-column>
                <el-table-column align="center" prop="district" label="开店区／县" width="100"></el-table-column>
                <el-table-column align="center" prop="visit" label="到访情况" width="90">
                    <template slot-scope="scope">
                        <div v-if="scope.row.visitStatus === 0 && scope.row.showNoVisitFlag===1">
                            <el-button type="text" @click="showNotVisitReason(scope.row)"
                                       size="small">未到访（原因）
                            </el-button>
                        </div>
                        <div v-else-if="scope.row.visitStatus != 0&&scope.row.visitList.length > 0">
                            <el-button type="text" @click="showVisitRecord(scope.row)"
                                       size="small">点击查看
                            </el-button>
                        </div>

                        <div v-if="scope.row.noVisitList.length>0" v-for="item in scope.row.noVisitList ">
                            <el-button  size="mini" v-if="item.status==0" type="text" @click="showNoVisitRecord(item)" style="color: red">未到访（驳回）</el-button>
                        </div>

                        <div v-if="scope.row.visitHisList.length>0">
                            <el-button size="mini" type="text" @click="showHistory(scope.row)">历史到访记录</el-button>
                        </div>

                    </template>
                </el-table-column>
                <el-table-column align="center" label="签约单" width="240">
                    <template slot-scope="scope">
                        <!--<div  v-if="scope.row.signList.length>=1"   v-for="item in scope.row.signList">
                            <el-button size="mini"  type="text" @click="toSignPage(item)">{{item.signNo}}</el-button>
                        </div>-->
                        <div v-if="scope.row.signList.length>=1" v-for="item in scope.row.signList">
                            <el-button size="mini" v-if="item.signStatus==0" type="text" style="color: red"
                                       @click="toSignPage(item)">
                                <span style="color: blue">{{item.signNo}}</span><span style="color: red">（被驳回）</span>
                            </el-button>
                            <el-button size="mini" v-else-if="item.signStatus==1" type="text" style="color:#4ab65c"
                                       @click="toSignPage(item)">
                                <span style="color: blue">{{item.signNo}}</span><span style="color: green">（审核中）</span>
                            </el-button>
                            <el-button size="mini"
                                       v-else-if="item.signStatus==2 && (item.refundStatus==4 || item.refundStatus==6)"
                                       type="text"
                                       style="color:red" @click="toSignPage(item)">
                                <span style="color: blue">{{item.signNo}}</span><span style="color: red">（已退款）</span>
                            </el-button>
                            <el-button size="mini"
                                       v-else-if="item.signStatus==2 && item.refundStatus != 4 && item.refundStatus != 6"
                                       type="text"
                                       @click="toSignPage(item)">{{item.signNo}}
                            </el-button>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="signShopType" label="签约店型" :formatter="transformShop" width="100"></el-table-column>
                <el-table-column align="center" prop="advanceAmount" label="投资金额" :formatter="transformUssm" width="100"></el-table-column>
                <el-table-column align="center" prop="purType" label="意向品类" :formatter="transformPurProject" width="120"></el-table-column>
                <el-table-column align="center" prop="busGroupName" label="商务组" width="100"></el-table-column>
                <el-table-column align="center" prop="busDirectorName" label="商务总监" width="120"></el-table-column>
                <el-table-column align="center" prop="busAreaName" label="商务大区" width="100"></el-table-column>
                <el-table-column align="center" prop="teleSaleName" label="电销顾问" width="120"></el-table-column>
                <el-table-column align="center" prop="accountPhone" label="电销顾问电话" width="100"></el-table-column>
                <el-table-column align="center" prop="teleProjectName" label="电销组项目" width="100"></el-table-column>
                <el-table-column align="center" prop="isView" label="读取客户状态" :formatter="transformView" width="120"></el-table-column>
                <el-table-column align="center" prop="appiontmentCreateTime" sortable label="提交邀约来访时间" :formatter="dateFormat" width="145"></el-table-column>    
                <el-table-column align="center" prop="allocateTime" sortable label="接收邀约时间" :formatter="dateFormat" width="130"></el-table-column>
                <el-table-column prop="delFalg" label="邀约来访状态" align="center" width="120px">
                    <template slot-scope="scope">
                        <div v-if="scope.row.delFalg == 0">
                            正常
                        </div>
                        <div v-else-if="scope.row.delFalg ==1">
                            已删除
                        </div>
                        <div v-else-if="scope.row.delFalg ==2">
                            取消
                        </div>
                    </template>
                </el-table-column>

               <!--  <el-table-column align="center" prop="isInviteLetter" label="是否有邀请函" :formatter="transformLetter" width="120"></el-table-column> 
                <el-table-column align="center" prop="sex" label="客户性别" :formatter="transformSex"></el-table-column>
                <el-table-column align="center" prop="age" label="客户年龄"></el-table-column>                
                <el-table-column align="center" prop="partnerType" label="合伙人" :formatter="transformPartner"></el-table-column>
                <el-table-column align="center" prop="hasExperience" label="餐饮经验" :formatter="transformExperience"></el-table-column>                
                <el-table-column align="center" prop="hasAddress" label="选址情况" :formatter="transformAddress"></el-table-column>
                <el-table-column align="center" prop="area" label="店面面积" :formatter="transformArea"></el-table-column> -->
            </el-table>
            <table-pagination v-if="paginationShow" :pager="pager" @change="searchTable"></table-pagination>
        </el-row>
    </div>

    <!-- dialog -->
    <el-dialog title="分发资源" :visible.sync="allocationVisible" width="540px">
        <template>
            <el-form :model="allocationForm" ref="allocationForm" :rules="allocationFormRules">
                <p class="marginB10">{{allocationForm.message}}</p>
                <el-form-item label="商务经理:" label-width="100px" prop="saleId">
                    <el-select v-model="allocationForm.saleId" placeholder="组内商务经理姓名" style="width: 260px;margin-right: 10px;" filterable>
                        <el-option v-for="item in saleOptions" :key="item.id" :label="item.name"
                                   :value="item.id"></el-option>
                    </el-select>
                    <el-button type="text" @click="showSaleIdOther" size="mini">
                        <i v-if="!isSaleIdOther" class="el-icon-plus"/></i>
                        <i v-if="isSaleIdOther" class="el-icon-minus"/></i>
                        辅助经理
                    </el-button>
                </el-form-item>
                <el-form-item label="辅助商务经理:" label-width="100px" prop="" style="margin-bottom: 20px;" v-if="isSaleIdOther">
                    <el-select v-model="allocationForm.saleIdOther" placeholder="组内商务经理姓名" style="width: 260px;margin-right: 10px;" filterable>
                        <el-option v-for="item in saleOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
                    </el-select>
                    <p style="position: absolute;bottom: -25px;color: #f56c6c;">增加辅助商务经理后，签约后两个商务经理将平分业绩</p>
                </el-form-item>
                <el-form-item label="备注:" label-width="100px" prop="remark">
                    <el-input type="textarea" v-model="allocationForm.remark" class="input-with-select" maxLength="200"
                              placeholder="输入分发备注" style="width: 350px"></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" :disabled="submitDisable" @click="allocationClue('allocationForm')">提 交
                </el-button>
                <el-button @click="allocationVisible = false">取 消</el-button>
            </div>
        </template>
    </el-dialog>
    <!-- dialog -->
    <!-- dialog -->
    <el-dialog title="外调经理" :visible.sync="transferVisible" width="540px">
        <template>
            <el-form :model="transferForm" ref="transferForm" :rules="transferFormRules">
                <p class="marginB10">{{transferForm.message}}</p>
                <el-form-item label="商务经理:" label-width="100px" prop="saleId">
                    <el-select v-model="transferForm.saleId" placeholder="外调经理姓名（所属大区-所属组）" style="width: 350px" filterable>
                        <el-option v-for="item in allSaleOptions" :key="item.id" :label="item.name"
                                   :value="item.id"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="备注:" label-width="100px" prop="remark">
                    <el-input type="textarea" v-model="transferForm.remark" class="input-with-select" maxLength="200"
                              placeholder="输入外调备注" style="width: 350px"></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" :disabled="submitDisable" @click="transferClue('transferForm')">提 交
                </el-button>
                <el-button @click="transferVisible = false">取 消</el-button>
            </div>
        </template>
    </el-dialog>
    <!-- dialog -->
    <!--未到访原因-->
    <el-dialog title="未到访原因" :visible.sync="notVisitdDialogVisible" width="540px">
        <template>
            <el-form :model="notVisitFlag" ref="notVisitFlag">
                <el-form-item label="" :required="true">
                    <span style="display:block;color: #1e2746; width:90%; word-wrap:break-word; word-break:normal;">标记未到访人员：{{notVisitFlag.createUserName}}</span>
                    <span style="display:block;color: #1e2746; width:90%; word-wrap:break-word; word-break:normal;">标记未到访时间：{{notVisitFlag.notVisitTime}}</span>
                    <br>
                    <span style="display:block;color: #1e2746; width:90%; word-wrap:break-word; word-break:normal;">未到访原因：<br>{{notVisitFlag.str}}</span>
                    <!-- <el-button type="text" disabled style="color: #1e2746">{{notVisitFlag.str}}</el-button> -->
                </el-form-item>
            </el-form>
        </template>
    </el-dialog>
    <!--
        到访记录展示  这个需要放到一个单独的页面中
     -->
    <el-dialog title="到访记录" :visible.sync="showVisitAduitDialogVisible" width="70%">
        <template>
            <div v-show="showVisitAduitDatas.oneShow">
                <el-button size="mini" type="text" style="color: #1e2746">首次到访</el-button>
                <el-table :data="showVisitAduitDatas.one" style="width: 100%" tooltip-effect="dark" ref="multipleTable">
                    <el-table-column prop="customerName" label="客户姓名" width="100" align="center"></el-table-column>
                    <el-table-column prop="projectName" label="考察项目" width="100" align="center"></el-table-column>
                    <el-table-column prop="companyName" label="考察公司" width="100" align="center"></el-table-column>
                    <el-table-column prop="vistitTime" label="到访时间" width="100" :formatter="formatVisitTime"
                                     align="center"></el-table-column>
                    <el-table-column prop="signProvince" label="预签约省份" width="100" align="center"></el-table-column>
                    <el-table-column prop="signCity" label="预签约市" width="100" align="center"></el-table-column>
                    <el-table-column prop="signDistrict" label="预签约区/县" align="center" width="120"></el-table-column>
                    <el-table-column prop="vistitStoreTypeName" label="到访店铺类型" align="center"
                                     width="120"></el-table-column>
                    <el-table-column prop="visitType" label="到访类型" width="100" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.visitType == 1">
                                预约来访
                            </div>
                            <div v-else-if="scope.row.visitType == 2">
                                慕名来访
                            </div>
                            <div v-else-if="scope.row.visitType == 3">
                                临时来访
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="arrVisitCity" label="到访城市" width="100" align="center"></el-table-column>
                    <el-table-column prop="visitPeopleNum" label="到访人数" align="center"></el-table-column>
                    <el-table-column prop="createTime" label="创建时间" width="100" align="center"></el-table-column>
                    <el-table-column prop="createUserName" label="创建人" width="100" align="center"></el-table-column>
                    <el-table-column prop="isSign" label="是否签约" width="100" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.isSign === 0">
                                否
                            </div>
                            <div v-else-if="scope.row.isSign ===1">
                                是
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="status" label="到访有效性" align="center" width="100">
                        <template slot-scope="scope">
                            <div v-if="scope.row.status === 1">
                                审核中
                            </div>
                            <div v-else-if="scope.row.status ===2">
                                有效
                            </div>
                        </template>
                    </el-table-column>
                </el-table>
                <p v-show="showVisitAduitDatas.oneNotSignShow" style="color: #1e2746">
                    未签约原因：{{showVisitAduitDatas.oneNotSignReason}}</p>
                <p v-show="showVisitAduitDatas.oneRebutShow" style="color:red">
                    驳回原因：{{showVisitAduitDatas.oneRebutReason}}</p>
            </div>
            <br>
            <div v-show="showVisitAduitDatas.twoShow">
                <el-button size="mini" type="text" style="color: #1e2746">2次到访</el-button>
                <el-table :data="showVisitAduitDatas.two" style="width: 100%" tooltip-effect="dark" ref="multipleTable">
                    <el-table-column prop="customerName" label="客户姓名" width="100" align="center"></el-table-column>
                    <el-table-column prop="projectName" label="考察项目" width="100" align="center"></el-table-column>
                    <el-table-column prop="companyName" label="考察公司" width="100" align="center"></el-table-column>
                    <el-table-column prop="vistitTime" label="到访时间" width="100" :formatter="formatVisitTime"
                                     align="center"></el-table-column>
                    <el-table-column prop="signProvince" label="预签约省份" width="100" align="center"></el-table-column>
                    <el-table-column prop="signCity" label="预签约市" width="100" align="center"></el-table-column>
                    <el-table-column prop="signDistrict" label="预签约区/县" width="120" align="center"></el-table-column>
                    <el-table-column prop="vistitStoreTypeName" label="到访店铺类型" width="120"
                                     align="center"></el-table-column>
                    <el-table-column prop="visitType" label="到访类型" width="100" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.visitType == 1">
                                预约来访
                            </div>
                            <div v-else-if="scope.row.visitType == 2">
                                慕名来访
                            </div>
                            <div v-else-if="scope.row.visitType == 3">
                                临时来访
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="arrVisitCity" label="到访城市" width="100" align="center"></el-table-column>
                    <el-table-column prop="visitPeopleNum" label="到访人数" width="100" align="center"></el-table-column>
                    <el-table-column prop="createTime" label="创建时间" width="100" align="center"></el-table-column>
                    <el-table-column prop="createUserName" label="创建人" width="100" align="center"></el-table-column>
                    <el-table-column prop="isSign" label="是否签约" width="100" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.isSign === 0">
                                否
                            </div>
                            <div v-else-if="scope.row.isSign ===1">
                                是
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="status" label="到访有效性" width="100" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.status === 1">
                                审核中
                            </div>
                            <div v-else-if="scope.row.status ===2">
                                有效
                            </div>
                        </template>
                    </el-table-column>
                </el-table>
                <p v-show="showVisitAduitDatas.twoNotSignShow" style="color: #1e2746">
                    未签约原因：{{showVisitAduitDatas.twoNotSignReason}}</p>
                <p v-show="showVisitAduitDatas.twoRebutShow" style="color: red">
                    驳回原因：{{showVisitAduitDatas.twoRebutReason}}</p>
            </div>
            <br>
            <div v-show="showVisitAduitDatas.threeShow">
                <el-button size="mini" type="text" style="color: #1e2746">多次到访</el-button>
                <el-table :data="showVisitAduitDatas.three" style="width: 100%" tooltip-effect="light"
                          ref="multipleTable">
                    <el-table-column prop="customerName" label="客户姓名" width="100" align="center"></el-table-column>
                    <el-table-column prop="projectName" label="考察项目" width="100" align="center"></el-table-column>
                    <el-table-column prop="companyName" label="考察公司" width="100" align="center"></el-table-column>
                    <el-table-column prop="vistitTime" label="到访时间" width="100" :formatter="formatVisitTime"
                                     align="center"></el-table-column>
                    <el-table-column prop="signProvince" label="预签约省份" width="100" align="center"></el-table-column>
                    <el-table-column prop="signCity" label="预签约市" width="100" align="center"></el-table-column>
                    <el-table-column prop="signDistrict" label="预签约区/县" width="120" align="center"></el-table-column>
                    <el-table-column prop="vistitStoreTypeName" label="到访店铺类型" width="120"
                                     align="center"></el-table-column>
                    <el-table-column prop="visitType" label="到访类型" width="100" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.visitType == 1">
                                预约来访
                            </div>
                            <div v-else-if="scope.row.visitType == 2">
                                慕名来访
                            </div>
                            <div v-else-if="scope.row.visitType == 3">
                                临时来访
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="arrVisitCity" label="到访城市" width="100" align="center"></el-table-column>
                    <el-table-column prop="visitPeopleNum" label="到访人数" width="100" align="center"></el-table-column>
                    <el-table-column prop="createTime" label="创建时间" width="100" align="center"></el-table-column>
                    <el-table-column prop="createUserName" label="创建人" width="100" align="center"></el-table-column>
                    <el-table-column prop="isSign" label="是否签约" width="100" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.isSign === 0">
                                否
                            </div>
                            <div v-else-if="scope.row.isSign ===1">
                                是
                            </div>
                        </template>
                    </el-table-column>

                    <el-table-column prop="notSignReason" label="未签约原因" width="200" show-overflow-tooltip="true"
                                     align="center"></el-table-column>
                    <el-table-column prop="rebutReason" label="驳回原因" width="200" show-overflow-tooltip="true"
                                     align="center"></el-table-column>

                    <el-table-column prop="status" label="到访有效性" width="100" align="center">
                        <template slot-scope="scope">
                            <div v-if="scope.row.status === 1">
                                审核中
                            </div>
                            <div v-else-if="scope.row.status ===2">
                                有效
                            </div>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
        </template>
    </el-dialog>
    <el-dialog title="历史记录" :visible.sync="showHisVisitRecordDialog" width="70%">
        <template>
            <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
                <el-tab-pane v-for="(item, index) in editableTabs" :key="item.name" :label="item.title"
                             :name="item.name">
                    <div v-show="!showTabNotVisitData">
                        <div v-show="showVisitAduitDatas.oneShow">
                            <el-button size="mini" type="text" style="color: #1e2746">首次到访</el-button>
                            <el-table :data="showVisitAduitDatas.one" style="width: 100%" tooltip-effect="dark"
                                      ref="multipleTable">
                                <el-table-column prop="customerName" label="客户姓名" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="projectName" label="考察项目" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="companyName" label="考察公司" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="vistitTime" label="到访时间" width="100" :formatter="formatVisitTime"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signProvince" label="预签约省份" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signCity" label="预签约市" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signDistrict" label="预签约区/县" align="center"
                                                 width="120"></el-table-column>
                                <el-table-column prop="vistitStoreTypeName" label="到访店铺类型" align="center"
                                                 width="120"></el-table-column>
                                <el-table-column prop="visitType" label="到访类型" width="100" align="center">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.visitType == 1">预约来访</div>
                                        <div v-else-if="scope.row.visitType == 2">慕名来访</div>
                                        <div v-else-if="scope.row.visitType == 3">临时来访</div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="arrVisitCity" label="到访城市" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="visitPeopleNum" label="到访人数" align="center"></el-table-column>
                                <el-table-column prop="createTime" label="创建时间" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="createUserName" label="创建人" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="isSign" label="是否签约" width="100" align="center">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.isSign === 0">否</div>
                                        <div v-else-if="scope.row.isSign ===1">是</div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="status" label="到访有效性" align="center" width="100">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.status === 1">审核中</div>
                                        <div v-else-if="scope.row.status ===2">有效</div>
                                        <div v-else-if="scope.row.status ===0">无效</div>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <p v-show="showVisitAduitDatas.oneNotSignShow" style="color: #1e2746">
                                未签约原因：{{showVisitAduitDatas.oneNotSignReason}}</p>
                            <p v-show="showVisitAduitDatas.oneRebutShow" style="color:red">
                                驳回原因：{{showVisitAduitDatas.oneRebutReason}}</p>
                        </div>
                        <br>
                        <div v-show="showVisitAduitDatas.twoShow">
                            <el-button size="mini" type="text" style="color: #1e2746">2次到访</el-button>
                            <el-table :data="showVisitAduitDatas.two" style="width: 100%" tooltip-effect="dark"
                                      ref="multipleTable">
                                <el-table-column prop="customerName" label="客户姓名" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="projectName" label="考察项目" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="companyName" label="考察公司" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="vistitTime" label="到访时间" width="100" :formatter="formatVisitTime"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signProvince" label="预签约省份" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signCity" label="预签约市" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signDistrict" label="预签约区/县" width="120"
                                                 align="center"></el-table-column>
                                <el-table-column prop="vistitStoreTypeName" label="到访店铺类型" width="120"
                                                 align="center"></el-table-column>
                                <el-table-column prop="visitType" label="到访类型" width="100" align="center">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.visitType == 1">预约来访</div>
                                        <div v-else-if="scope.row.visitType == 2">慕名来访</div>
                                        <div v-else-if="scope.row.visitType == 3">临时来访</div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="arrVisitCity" label="到访城市" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="visitPeopleNum" label="到访人数" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="createTime" label="创建时间" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="createUserName" label="创建人" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="isSign" label="是否签约" width="100" align="center">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.isSign === 0">否</div>
                                        <div v-else-if="scope.row.isSign ===1">是</div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="status" label="到访有效性" width="100" align="center">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.status === 1">审核中</div>
                                        <div v-else-if="scope.row.status ===2">有效</div>
                                        <div v-else-if="scope.row.status ===0">无效</div>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <p v-show="showVisitAduitDatas.twoNotSignShow" style="color: #1e2746">
                                未签约原因：{{showVisitAduitDatas.twoNotSignReason}}</p>
                            <p v-show="showVisitAduitDatas.twoRebutShow" style="color: red">
                                驳回原因：{{showVisitAduitDatas.twoRebutReason}}</p>
                        </div>
                        <br>
                        <div v-show="showVisitAduitDatas.threeShow">
                            <el-button size="mini" type="text" style="color: #1e2746">多次到访</el-button>
                            <el-table :data="showVisitAduitDatas.three" style="width: 100%" tooltip-effect="light"
                                      ref="multipleTable">
                                <el-table-column prop="customerName" label="客户姓名" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="projectName" label="考察项目" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="companyName" label="考察公司" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="vistitTime" label="到访时间" width="100" :formatter="formatVisitTime"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signProvince" label="预签约省份" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signCity" label="预签约市" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="signDistrict" label="预签约区/县" width="120"
                                                 align="center"></el-table-column>
                                <el-table-column prop="vistitStoreTypeName" label="到访店铺类型" width="120"
                                                 align="center"></el-table-column>
                                <el-table-column prop="visitType" label="到访类型" width="100" align="center">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.visitType == 1">预约来访</div>
                                        <div v-else-if="scope.row.visitType == 2">慕名来访</div>
                                        <div v-else-if="scope.row.visitType == 3">临时来访</div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="arrVisitCity" label="到访城市" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="visitPeopleNum" label="到访人数" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="createTime" label="创建时间" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="createUserName" label="创建人" width="100"
                                                 align="center"></el-table-column>
                                <el-table-column prop="isSign" label="是否签约" width="100" align="center">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.isSign === 0">否</div>
                                        <div v-else-if="scope.row.isSign ===1">是</div>
                                    </template>
                                </el-table-column>
                                <el-table-column prop="notSignReason" label="未签约原因" width="200" show-overflow-tooltip
                                                 align="center"></el-table-column>
                                <el-table-column prop="rebutReason" label="驳回原因" width="200" show-overflow-tooltip
                                                 align="center"></el-table-column>
                                <el-table-column prop="status" label="到访有效性" width="100" align="center">
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.status === 1">审核中</div>
                                        <div v-else-if="scope.row.status ===2">有效</div>
                                        <div v-else-if="scope.row.status ===0">无效</div>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                    </div>
                    <div v-show="showTabNotVisitData">
                        <el-table :data="notVisitData" style="width: 100%" tooltip-effect="dark" ref="multipleTable">
                            <el-table-column prop="customerName" label="客户姓名" width="100"
                                             align="center"></el-table-column>
                            <el-table-column prop="projectName" label="考察项目" width="100"
                                             align="center"></el-table-column>
                            <el-table-column prop="signProvince" label="预签约省份" width="100"
                                             align="center"></el-table-column>
                            <el-table-column prop="signCity" label="预签约市" width="100" align="center"></el-table-column>
                            <el-table-column prop="signDistrict" label="预签约区/县" align="center"
                                             width="120"></el-table-column>
                            <el-table-column prop="createTime" label="创建时间" width="100"
                                             align="center"></el-table-column>
                            <el-table-column prop="createUserName" label="创建人" width="100"
                                             align="center"></el-table-column>
                            <el-table-column prop="notVisitReason" label="未到访原因" width="100"
                                             align="center"></el-table-column>
                            <el-table-column prop="status" label="未到访有效性" align="center" width="100">
                                <template slot-scope="scope">
                                    <div v-if="scope.row.status === 1">审核中</div>
                                    <div v-else-if="scope.row.status ===2">有效</div>
                                    <div v-else-if="scope.row.status ===0">无效</div>
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                </el-tab-pane>
            </el-tabs>
        </template>
    </el-dialog>

    <!--标记未到访-->
    <el-dialog title="提示" :visible.sync="notVisitFlagDialogVisible" width="540px">
        <template>
            <el-form :model="notVisitFlag" ref="notVisitFlag" :rules=" notVisitFlagRules">
                <el-form-item>
                    <!--<el-button type="text" disabled style="color: #1e2746; width:100px; word-wrap:break-word; word-break:normal;">{{notVisitFlag.str}}</el-button>-->
                    <span style=" display: block; color: #1e2746; word-wrap: break-word; word-break: normal;">{{notVisitFlag.str}}</span>
                </el-form-item>
                <el-form-item label="未到访原因:" label-width="100px" prop="notVisitReason">
                    <el-input type="textarea" v-model="notVisitFlag.notVisitReason" maxlength="100" :rows="3"
                              placeholder="请输入内容(限制100字)"></el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer" style="text-align:center;">
                <el-button type="primary" :disabled="submitDisable"  @click="saveNotVisit">确定</el-button>
                <el-button @click="notVisitFlagDialogVisible = false">取消</el-button>
            </div>
        </template>
    </el-dialog>
</div>
<!-- import common js-->
<div th:include="_footer_include :: #jsLib"></div>
<!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
<script th:src="@{/js/common/element-ui-index.js}"></script>
</body>
<script th:inline="javascript">
    var busSaleGroupList = [[${busSaleGroupList}]];//搜索商务组
    var busDirectorList = [[${busDirectorList}]];//搜索商务总监
    var busSaleList = [[${busSaleList}]];//分发商务经理
    var allSaleList = [[${allSaleList}]];//所有商务经理
    var teleSaleGroupList = [[${teleSaleGroupList}]];//电销组
    var projectList = [[${projectList}]];//项目
    var provinceList = [[${provinceList}]];//省份
    var optionAddressList = [[${optionAddressList}]];//选址情况
    var partnerList = [[${partnerList}]];//合伙人
    var cateringExperienceList = [[${cateringExperienceList}]];//餐饮经验
    var shopTyleList = [[${shopTyleList}]];//签约店型
    var storefrontAreaList = [[${storefrontAreaList}]];//店铺面积
    var ussmList = [[${ussmList}]];//投资金额
    var purTypeList = [[${purTypeList}]] // 意向品类
    var ownOrgId=[[${ownOrgId}]];//商务总监商务组
    //角色编码
    var roleCode = [[${roleCode}]];
    var customerVM = new Vue({
        el: '#clueManage',
        data: {
            isSaleIdOther:false,
            paginationShow: false,
            isShow: false,
            cusTitleName: '',//到访情况-点击查看-title客户名称
            activeName: '',
            hisDatas: [],
            notVisitData: [],
            importVisitPerFlag:true,
            showTabNotVisitData: false,
            isSWZDisabled:false,
            editableTabs: [],
            searchForm: {
                visitStatus: '',
                isSign: '',
                teleGorupId: '',
                teleSaleId: '',
                tasteProjectId: '',
                province: '',
                isView: '',
                busGroupId: ownOrgId,
                busDirectorId: '',
                busSaleId: '',
                cusName: '',
                startTime: '',
                endTime: '',
                startReserveTime: '',
                endReserveTime: '',
                startAllocationTime: '',
                endAllocationTime: '',
                sortField: '',
                sortType: '',
                isTailMoney: '',
                signNo:""
            },
            isTailMoneyArr: [{value: '', label: '全部'}, {value: '0', label: '否'}, {value: '1', label: '是'}],
            allocationForm: {
                saleId: '',
                remark: '',
                message: '',
                saleIdOther:'',//辅助商务经理
            },
            transferForm: {
                saleId: '',
                remark: '',
                message: ''
            },
            notVisitFlag: {
                clueId: "",
                str: "",
                clueIds: [],
                notVisitReason: "",
                createUserName:"",
                notVisitTime:""
            },
            showVisitAduitDatas: {
                one: [],
                two: [],
                three: [],
                oneNotSignReason: "",
                twoNotSignReason: "",
                threeNotSignReason: "",
                oneRebutReason: "",
                twoRebutReason: "",
                threeRebutReason: "",
                oneShow: true,
                twoShow: false,
                threeShow: false,
                oneRebutShow: false,
                twoRebutShow: false,
                threeRebutShow: false,
                oneNotSignShow: false,
                twoNotSignShow: false,
                threeNotSignShow: false
            },
            dataTable: [],
            saleOptions: busSaleList,
            allSaleOptions: allSaleList,
            busGroupOptions: busSaleGroupList,
            busDirectorOptions: busDirectorList,
            busSaleOptions: busSaleList,
            teleGorupOptions: teleSaleGroupList,
            teleSaleOptions: [],
            projectOptions: projectList,
            provinceOptions: provinceList,
            notVisitFlagDialogVisible: false,
            showHisVisitRecordDialog: false,
            visitStatusOptions: [{
                value: '',
                name: "全部"
            }, {
                value: -1,
                name: "待处理"
            }, {
                value: 0,
                name: "未到访"
            },{
                value: 1,
                name: '首次到访'
            }, {value: 2, name: '2次到访'}, {value: 3, name: '3次到访'},{value: 4, name: '4次到访'},{value: 5, name: '5次到访'}],
            isSignOptions: [{
                value: 0,
                name: "未签约"
            }, {
                value: 1,
                name: "已签约"
            }],
            isViewOptions: [{
                value: 0,
                name: "未读"
            }, {
                value: 1,
                name: "已读"
            }],

            submitDisable: false,
            allocationVisible: false,
            transferVisible: false,
            notVisitdDialogVisible: false,
            showVisitAduitDialogVisible: false,
            pager: {
                total: 0,
                currentPage: 1,
                pageSize: 20,
            },
            allocationFormRules: {
                saleId: [
                    {required: true, message: '请选择商务经理', trigger: 'change'}
                ]
            },
            transferFormRules: {
                saleId: [
                    {required: true, message: '请选择商务经理', trigger: 'change'}
                ]
            },
            notVisitFlagRules: {
                notVisitReason: [
                    {required: true, message: '未到访原因为必填项', trigger: 'blur'},
                    {min: 1, max: 100, message: '长度在 1 到 100 个字符', trigger: 'blur'}
                ],
            },
            multipleSelection: [],
            formLabelWidth: '150px',
            formLabelWidth1: '120px',
            formLabelWidth2: '98px',
            storeForm: {
                visitStatus: '',
                isSign: '',
                teleGorupId: '',
                teleSaleId: '',
                tasteProjectId: '',
                province: '',
                isView: '',
                busGroupId: ownOrgId,
                busDirectorId: '',
                busSaleId: '',
                cusName: '',
                startTime: '',
                endTime: '',
                startReserveTime: '',
                endReserveTime: '',
                startAllocationTime: '',
                endAllocationTime: '',
                sortField: '',
                sortType: '',
                isTailMoney: ''
            },
            storeId: '',
            scrollTop: 0,
        },
        methods: {
            showSaleIdOther(){
                if(this.isSaleIdOther){
                    this.isSaleIdOther=false;
                    // 清空辅助经理的值
                    this.allocationForm.saleIdOther="";
                }else{
                    this.isSaleIdOther=true;
                }
            },
            clickRow(row){
                this.$refs.multipleTable.toggleRowSelection(row)
            },
            searchTable() {
                var startTime = this.searchForm.startTime;
                var endTime = this.searchForm.endTime;
                var startReserveTime = this.searchForm.startReserveTime;
                var endReserveTime = this.searchForm.endReserveTime;
                var startAllocationTime = this.searchForm.startAllocationTime;
                var endAllocationTime = this.searchForm.endAllocationTime;
                var vilad = false;
                if (startTime && endTime && startTime > endTime) {
                    vilad = true;
                }
                if (startReserveTime && endReserveTime && startReserveTime > endReserveTime) {
                    vilad = true;
                }
                if (startAllocationTime && endAllocationTime && startAllocationTime > endAllocationTime) {
                    vilad = true;
                }
                if (vilad) {
                    this.$message({
                        message: '开始时间不能大于结束时间',
                        type: 'warning'
                    });
                    return;
                }
                var param = this.searchForm;
                param.pageSize = this.pager.pageSize;
                param.pageNum = this.pager.currentPage;
                param.sortField = this.searchForm.sortField;
                param.sortType = this.searchForm.sortType;
                param.isTailMoney = this.searchForm.isTailMoney;
                axios.post('/business/busCustomerManager/list', param)
                .then(function (response) {
                    var result = response.data;
                    console.info(result);
                    var table = result.data;                    
                    if(result.code=="0"){
                        // 插入序号
                        for (var i =0;i< table.data.length; i++) {
                            table.data[i].index=i+1
                        }
                        customerVM.dataTable = table.data;
                        customerVM.pager.total = table.total;
                        customerVM.pager.currentPage = table.currentPage;
                    }else{
                        customerVM.$message.error(result.msg);
                    }
                    // 取出存储的id
                    if(!customerVM.paginationShow){
                         if(customerVM.storeId){
                             customerVM.$nextTick(function(){
                                var storage = [];
                                customerVM.dataTable.forEach(function(item, index){
                                    if(item.clueId === customerVM.storeId ){
                                        storage.push(customerVM.dataTable[index]);
                                    }
                                })
                                customerVM.toggleSelection(storage);
                                customerVM.$el.querySelector('.el-table__body-wrapper').scrollTop = customerVM.scrollTop;
                            })
                        }
                     }else{
                        customerVM.removeSessionStore ("busCustomerManagerStoreForm");
                        customerVM.removeSessionStore ("busCustomerManagerOtherVal");
                     }
                    customerVM.paginationShow = true;
                    customerVM.storeForm = customerVM.searchForm;
                })
                .catch(function (error) {
                    console.log(error);
                });

            },
            toggleSelection(rows) { // table select 默认选中fn
                if (rows) {
                    rows.forEach(row => {
                        this.$refs.multipleTable.toggleRowSelection(row,true);
                    });
                } else {
                    this.$refs.multipleTable.clearSelection();
                }
            },
            importVisitPer(){
              var startTime = this.searchForm.startTime;
              var endTime = this.searchForm.endTime;
              var startReserveTime = this.searchForm.startReserveTime;
              var endReserveTime = this.searchForm.endReserveTime;
              var startAllocationTime = this.searchForm.startAllocationTime;
              var endAllocationTime = this.searchForm.endAllocationTime;
              var vilad = false;
              if (startTime && endTime && startTime > endTime) {
                vilad = true;
              }
              if (startReserveTime && endReserveTime && startReserveTime > endReserveTime) {
                vilad = true;
              }
              if (startAllocationTime && endAllocationTime && startAllocationTime > endAllocationTime) {
                vilad = true;
              }
              if (vilad) {
                this.$message({
                  message: '开始时间不能大于结束时间',
                  type: 'warning'
                });
                return;
              }
              var param = this.searchForm;
              param.pageSize = this.pager.pageSize;
              param.pageNum = this.pager.currentPage;
              param.sortField = this.searchForm.sortField;
              param.sortType = this.searchForm.sortType;
              param.isTailMoney = this.searchForm.isTailMoney;

                localStorage.setItem('importVisitPer','1');
                this.timedown();
                axios.post('/business/busCustomerManager/exportVisitPer',param,{responseType:'blob'})
                .then(function (response) {
                    var data =  response.data;
                    var fileName = response.headers.filename;
                    saveAs(data,decodeURI(fileName));
                    customerVM.$notify({type: 'success', title: '提示', message: '到访业绩导出成功', position: 'bottom-right', duration: 0});
                    localStorage.removeItem("importVisitPer");
                }).catch(function (error) {
                    customerVM.$notify.error({title: '提示', message: error + ',到访业绩导出失败', position: 'bottom-right'});
                    localStorage.removeItem("importVisitPer");
                })
            },
            timedown(){
                console.log(0)
                clearInterval(this.timer);
                var importVisitPer = localStorage.getItem("importVisitPer");
                if(importVisitPer){
                    this.importVisitPerFlag=false;
                }else{
                    this.importVisitPerFlag=true;
                }
                if(importVisitPer){
                    this.timer=setInterval(this.timedown,1000)
                }else{
                    clearInterval(this.timer)
                }
            },

            notVisit() {
                var rows = customerVM.multipleSelection;
                if (rows.length == 0) {
                    this.$message({message: '请选择数据', type: 'warning'});
                    return false;
                } else {
                    var names = "";
                    var rowIds = [];
                    for (var i = 0; i < rows.length; i++) {
                        // if (rows[i].visitStatus == 0 || rows[i].visitStatus == 1 || rows[i].visitStatus == 2 || rows[i].visitStatus == 3) {
                        //     this.$message({message: '勾选数据中，包含了已到访或是已标记的客户', type: 'warning'});
                        //     return false;
                        // }
                        names = names + '【' + rows[i].cusName + '】';
                        rowIds.push(rows[i].clueId);
                    }
                    var str = '确定要将此' + names + '标记为未到访吗?';
                    this.notVisitFlag.clueIds = rowIds;
                    this.notVisitFlag.str = str;
                    this.notVisitFlag.notVisitReason = "";
                    this.notVisitFlagDialogVisible = true;
                    this.submitDisable = false;//提交按钮可点击
                }
            },
            saveNotVisit() {
                var param = this.notVisitFlag;
                param.type = "1";
                // 设置 clueid
                this.$refs['notVisitFlag'].validate((valid) => {
                    if (valid) {
                        customerVM.submitDisable = true;
                        axios.post("/aggregation/businessMyCustomer/notVisit", param)
                            .then(function (response) {
                                if (response.data.code == 0) {
                                    customerVM.$message({
                                        type: 'success', message: '标记成功!', duration: 2000, onClose: function () {
                                            customerVM.pager.pageNum = 1;
                                            // customerVM.submitDisable = false;//提交按钮可点击
                                            customerVM.searchTable();
                                            customerVM.notVisitFlagDialogVisible = false;
                                            // customerVM.addVisitRecord.clueId = "";
                                        }
                                    });
                                } else {
                                    customerVM.$message.error(response.data.msg);
                                    customerVM.submitDisable = false;
                                }
                            }).catch(function (error) {
                                console.log(error);
                                customerVM.submitDisable = false;
                        });
                    } else {
                        return false;
                    }
                });
            },
            //选择行
            handleSelectionChange(val) {
                this.multipleSelection = val;
            },
            handleSizeChange(val) {
                //下拉框  每页 10,20条切换 调用
                console.log(`每页 ${val} 条`);
                this.pageSize = val;
                this.initTableData(1);
            },
            handleCurrentChange(val) {
                //点击 页码
                console.log(`当前页: ${val}`);
                this.initTableData(val);
            },
            //考察项目转换方法
            transformProject(row, column, cellValue, index) {
                var text = "";
                if (projectList && cellValue) {
                    var array = cellValue.split(",");
                    for (var i = 0; i < array.length; i++) {
                        for (var j = 0; j < projectList.length; j++) {
                            if (array[i] == projectList[j].id) {
                                if (i == 0) {
                                    text = projectList[j].projectName;
                                } else {
                                    text = text + "," + projectList[j].projectName;
                                }
                            }
                        }
                    }
                }
                return text;
            },
            //意向品类转换方法
            transformPurProject(row, column, cellValue, index) {
                var text = "";
                if (purTypeList) {
                    for (var i = 0; i < purTypeList.length; i++) {
                        if (row.purType == purTypeList[i].value) {
                            text = purTypeList[i].name;
                        }
                    }
                }
                return text;
            },
            //性别转换方法
            transformSex(row, column, cellValue, index) {
                var text = "";
                if (cellValue == "1") {
                    text = "男"
                } else if (cellValue == "2") {
                    text = "女"
                }
                return text;
            },
            //到访状态转换方法
            transformVisit(row, column, cellValue, index) {

                var text = "";
                if (cellValue == "0") {
                    text = "未到访"
                } else if (cellValue == "1") {
                    text = "已到访"
                    var visitNum = row.auditVisitNum;
                    if(visitNum == 1){
                        text = '首次到访';
                    }else if(visitNum == 2){
                        text = '2次到访';
                    }else if(visitNum == 3){
                        text = '3次到访';
                    } else if(visitNum == 4){
                        text = '4次到访';
                    }else if(visitNum == 5){
                        text = '5次到访';
                    }

                } else {
                    text = "待处理"
                }
                // } else if (cellValue == "2") {
                //     text = "二次到访"
                // } else if (cellValue == "3") {
                //     text = "多次到访（" + row.visitNum + "次）"
                // }
                return text;
            },
            //签约状态转换方法
            transformSign(row, column, cellValue, index) {
                var text = "";
                if (cellValue == "0" || cellValue=="" || cellValue=="undefined" || cellValue==undefined) {
                    text = "未签约"
                } else if (cellValue == "1") {
                    text = "已签约"
                } else if (cellValue == "2") {
                    text = "已退款";
                }
                return text;
            },
            //读取状态转换方法
            transformView(row, column, cellValue, index) {
                var text = "";
                if (cellValue == "0") {
                    text = "未读"
                } else if (cellValue == "1") {
                    text = "已读"
                }
                return text;
            },
            //是否有邀请函
            transformLetter(row, column, cellValue, index) {
                var text="";
                if(cellValue == "0"){
                    text="否"
                }else if(cellValue == "1"){
                    text="是"
                }
                return text;
            },
            //签约店型转换方法
            transformShop(row, column, cellValue, index) {
                var text = "";
                if (shopTyleList) {
                    for (var i = 0; i < shopTyleList.length; i++) {
                        if (cellValue == shopTyleList[i].value) {
                            text = shopTyleList[i].name;
                        }
                    }
                }
                return text;
            },
            //合伙人转换方法
            transformPartner(row, column, cellValue, index) {
                var text = "";
                if (partnerList) {
                    for (var i = 0; i < partnerList.length; i++) {
                        if (cellValue == partnerList[i].value) {
                            text = partnerList[i].name;
                        }
                    }
                }
                return text;
            },
            //选址情况转换方法
            transformAddress(row, column, cellValue, index) {
                var text = "";
                if (optionAddressList) {
                    for (var i = 0; i < optionAddressList.length; i++) {
                        if (cellValue == optionAddressList[i].value) {
                            text = optionAddressList[i].name;
                        }
                    }
                }
                return text;
            },
            //餐饮经验转换方法
            transformExperience(row, column, cellValue, index) {
                var text = "";
                if (cateringExperienceList) {
                    for (var i = 0; i < cateringExperienceList.length; i++) {
                        if (cellValue == cateringExperienceList[i].value) {
                            text = cateringExperienceList[i].name;
                        }
                    }
                }
                return text;
            },
            //店铺面积转换方法
            transformArea(row, column, cellValue, index) {
                var text = "";
                if (storefrontAreaList) {
                    for (var i = 0; i < storefrontAreaList.length; i++) {
                        if (cellValue == storefrontAreaList[i].value) {
                            text = storefrontAreaList[i].name;
                        }
                    }
                }
                return text;
            },
            //投资金额转换方法
            transformUssm(row, column, cellValue, index) {
                var text = "";
                if (ussmList) {
                    for (var i = 0; i < ussmList.length; i++) {
                        if (cellValue == ussmList[i].value) {
                            text = ussmList[i].name;
                        }
                    }
                }
                return text;
            },
            //日期数据格式化方法
            dateFormat(row, column, cellValue, index) {
                if (cellValue == undefined) {
                    return "";
                }
                return moment(cellValue).format("YYYY-MM-DD HH:mm:ss");
            },
            //打开分发资源
            toAllocationClue() {
                this.allocationForm.message = "";
                var rows = this.multipleSelection;
                if (rows.length == 0) {
                    this.$message({
                        message: '请选择一条数据进行分发',
                        type: 'warning'
                    });
                    return;
                }
                if (this.$refs['allocationForm']) {
                    this.$refs['allocationForm'].resetFields();
                }
                var text = "";
                for (var i = 0; i < rows.length; i++) {
                    var curRow = rows[i];
                    if (curRow.busSaleId) {
                        text += "当前选择“" + curRow.cusName + "”已有之前服务商务经理" + curRow.busSaleName + ",";
                    }
                }
                if (text != "") {
                    text += "请确认后分发客户。";
                    this.allocationForm.message = text;
                }

                this.allocationVisible = true;                
                this.submitDisable = false;// 提交按钮可点击
                // 默认不显示辅助商务经理
                this.isSaleIdOther=false;
                // 清空辅助经理的值
                this.allocationForm.saleIdOther="";
            },
            allocationClue(formName) {//分发资源
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        customerVM.submitDisable = true;
                        var rows = this.multipleSelection;
                        var idList = [];
                        var clueIdList = [];
                        for (var i = 0; i < rows.length; i++) {
                            var curRow = rows[i];
                            idList.push(curRow.appiontmentId);
                            clueIdList.push(curRow.clueId);
                        }
                        //分发
                        var param = {};
                        param.type = 1;
                        param.idList = idList;
                        param.clueIdList = clueIdList;
                        param.busSaleId = this.allocationForm.saleId;
                        if(this.allocationForm.saleIdOther){
                            if(this.allocationForm.saleIdOther==this.allocationForm.saleId){
                                customerVM.$message({
                                   message: "辅助经理不能和商务经理相同",
                                   type: 'error'
                                }); 
                                return
                            }
                            param.busSale2Id=this.allocationForm.saleIdOther;
                        } 
                        param.remark = this.allocationForm.remark;
                        axios.post('/business/busAllocation/busAllocationClue', param)
                            .then(function (response) {
                                var data = response.data;
                                if (data.code == '0') {
                                    customerVM.$message({
                                        message: '分发成功', type: 'success', duration: 1000, onClose: function () {
                                            customerVM.allocationVisible = false;
                                            // customerVM.submitDisable = false;//按钮允许点击
                                            customerVM.searchTable();
                                        }
                                    });
                                } else {
                                    customerVM.$message({
                                        message: "接口调用失败",
                                        type: 'error'
                                    });
                                    customerVM.submitDisable = false;
                                }
                            })
                            .catch(function (error) {
                                customerVM.submitDisable = false;
                                console.log(error);
                            });
                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });

            },// method end
            //打开外调经理
            toTransferClue() {
                var rows = this.multipleSelection;
                if (rows.length == 0) {
                    this.$message({
                        message: '请选择一条数据进行外调',
                        type: 'warning'
                    });
                    return;
                }
                if (this.$refs['transferForm']) {
                    this.$refs['transferForm'].resetFields();
                }
                var text = "";
                for (var i = 0; i < rows.length; i++) {
                    var curRow = rows[i];
                    if (curRow.busSaleId) {
                        text += "当前选择“" + curRow.cusName + "”已有之前服务商务经理" + curRow.busSaleName + ",";
                    }
                }
                if (text != "") {
                    text += "请确认后分发客户。";
                    this.allocationForm.message = text;
                }
                this.transferVisible = true;
                this.submitDisable = false;//提交按钮可点击
            },
            transferClue(formName) {//外调经理
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        customerVM.submitDisable = true;
                        var rows = this.multipleSelection;
                        var idList = [];
                        var clueIdList = [];
                        for (var i = 0; i < rows.length; i++) {
                            var curRow = rows[i];
                            idList.push(curRow.appiontmentId);
                            clueIdList.push(curRow.clueId);
                        }
                        //外调
                        var param = {};
                        param.type = 2;
                        param.idList = idList;
                        param.clueIdList = clueIdList;
                        param.busSaleId = this.transferForm.saleId;
                        param.remark = this.transferForm.remark;
                        axios.post('/business/busAllocation/busAllocationClue', param)
                            .then(function (response) {
                                var data = response.data;
                                if (data.code == '0') {
                                    customerVM.$message({
                                        message: '外调成功', type: 'success', duration: 1000, onClose: function () {
                                            customerVM.transferVisible = false;
                                            // customerVM.submitDisable = false;//按钮可点击
                                            customerVM.searchTable();
                                        }
                                    });
                                } else {
                                    customerVM.$message({
                                        message: "接口调用失败",
                                        type: 'error'
                                    });
                                    customerVM.submitDisable = false;
                                }
                            })
                            .catch(function (error) {
                                customerVM.submitDisable = false;
                                console.log(error);
                            });
                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            },// method end
            showNotVisitReason(row) {
                // 展示未到访原因
                var param = {};
                param.id = row.clueId;
                axios.post('/busVisitRecord/notVisitReason', param).then(function (response) {
                    customerVM.notVisitdDialogVisible = true;
                    console.log(response)
                    customerVM.notVisitFlag.str = response.data.data.notVisitReason
                    customerVM.notVisitFlag.str = response.data.data.notVisitReason
                    customerVM.notVisitFlag.createUserName = response.data.data.createUserName
                    customerVM.notVisitFlag.notVisitTime = response.data.data.createTime
                });
            },


            showNoVisitRecord(item){
                var param = {};
                param.id = item.id;
                axios.post('/busVisitRecord/notVisitOne', param).then(function (response) {
                    customerVM.notVisitdDialogVisible = true;
                    console.log(response)
                    customerVM.notVisitFlag.str = response.data.data.notVisitReason
                    customerVM.notVisitFlag.str = response.data.data.notVisitReason
                    customerVM.notVisitFlag.createUserName = response.data.data.createUserName
                    customerVM.notVisitFlag.notVisitTime = response.data.data.createTime
                });
            },

            showVisitRecord(row) {
                // 展示到访记录
                this.showVisitAduitDialogVisible = true;
                var param = {};
                param.clueId = row.clueId
                param.busGroupId = row.busGroupId
                axios.post('/busVisitRecord/queryList', param).then(function (response) {
                    if (null === response || response.data == null || response.data.code != '0') {
                        if (response.data.code != '0') {
                            customerVM.$message({message: response.data.msg, type: 'warning'});
                        }
                        return false;
                    } else {
                        var dataList = response.data.data;
                        customerVM.setVisitRecordData(dataList);
                    }
                })
            },
            handleClick(tab, event) {
                console.log(tab)
                if (tab.label == '未到访记录') {
                    this.showTabNotVisitData = true;
                    customerVM.notVisitData = customerVM.hisDatas[tab.name];
                } else {
                    this.showTabNotVisitData = false;
                    customerVM.setVisitRecordData(customerVM.hisDatas[tab.name]);
                }
            },
            showHistory(row) {
                var param = {};
                customerVM.editableTabs = [];
                this.showHisVisitRecordDialog = true;
                this.activeName = "0"; // 通过名称设置默认显示
                param.clueId = row.clueId
                param.busGroupId = row.busGroupId
                axios.post('/busVisitRecord/queryHisList', param).then(function (response) {
                    // 动态生成tab
                    var tabs = [];
                    for (var i = 0; i < response.data.length; i++) {
                        var tab = {};
                        if (response.data[i][0]) {
                            if (response.data[i][0].isVisit == 0) {
                                tab.title = "未到访记录";
                            } else {
                                tab.title = response.data[i][0].createUserName + "-客户到访记录";
                            }
                            tab.name = "" + i;
                            tabs.push(tab)
                        }
                    }
                    customerVM.editableTabs = tabs;
                    customerVM.hisDatas = response.data;

                    if (customerVM.hisDatas[0][0]) {
                        if (response.data[0][0].isVisit == 0) {
                            customerVM.notVisitData = customerVM.hisDatas[0];
                            customerVM.showTabNotVisitData = true;
                        } else {
                            customerVM.setVisitRecordData(customerVM.hisDatas[0]);
                            customerVM.showTabNotVisitData = false;
                        }
                    }

                });
            },
            setVisitRecordData(dataList) {

                // 首次到访
                var first = [];
                if (dataList.length >= 1) {
                    first.push(dataList[dataList.length - 1])
                    customerVM.showVisitAduitDatas.one = first;
                    if (first[0].isSign == 0) {
                        customerVM.showVisitAduitDatas.oneNotSignReason = first[0].notSignReason;
                        customerVM.showVisitAduitDatas.oneNotSignShow = true;
                    }
                    if (first[0].rebutReason) {
                        customerVM.showVisitAduitDatas.oneRebutReason = first[0].rebutReason;
                        customerVM.showVisitAduitDatas.oneRebutShow = true;
                    }
                } else {
                    customerVM.showVisitAduitDatas.one = first;
                }
                // 二次到访
                var two = [];
                if (dataList.length >= 2) {
                    two.push(dataList[dataList.length - 2])
                    customerVM.showVisitAduitDatas.two = two;
                    customerVM.showVisitAduitDatas.twoShow = true;
                    if (two[0].isSign == 0) {
                        customerVM.showVisitAduitDatas.twoNotSignReason = two[0].notSignReason;
                        customerVM.showVisitAduitDatas.twoNotSignShow = true;
                    }
                    if (two[0].rebutReason) {
                        customerVM.showVisitAduitDatas.twoRebutReason = two[0].rebutReason;
                        customerVM.showVisitAduitDatas.twoRebutShow = true;
                    }
                } else {
                    customerVM.showVisitAduitDatas.two = two;
                    customerVM.showVisitAduitDatas.twoShow = false;
                }
                // 多次到访
                var three = []
                if (dataList.length >= 3) {
                    three = dataList.slice(0, dataList.length - 2)
                    customerVM.showVisitAduitDatas.three = three;
                    customerVM.showVisitAduitDatas.threeShow = true;
                    if (three[0].isSign == 0) {
                        customerVM.showVisitAduitDatas.threeNotSignReason = three[0].notSignReason;
                        customerVM.showVisitAduitDatas.threeNotSignShow = true;
                    }
                    if (three[0].rebutReason) {
                        customerVM.showVisitAduitDatas.threeRebutReason = three[0].rebutReason;
                        customerVM.showVisitAduitDatas.threeRebutShow = true;
                    }
                } else {
                    customerVM.showVisitAduitDatas.three = three;
                    customerVM.showVisitAduitDatas.threeShow = false;
                }
            },
            toSignPage(row) {  // 进入签约单明细  能够 新增付款
                var clueId=row.clueId;
                // 存储选中信息--start
                this.setSessionStore("busCustomerManagerStoreForm", this.storeForm);
                var otherVal = {
                    "currentPage": this.pager.currentPage,
                    "clueId": clueId,
                    "scrollTop": this.$el.querySelector('.el-table__body-wrapper').scrollTop
                }
                this.setSessionStore("busCustomerManagerOtherVal", otherVal);
                // 存储选中信息--end
                window.location.href = '/businesssign/visitRecordPage?readyOnly=1&showSignButton=1&clueId=' + clueId + "&signId=" + row.signId+"&type=2";
            },
            showCustomerDetail(row, column) { // 客户详情
                var clueId=row.clueId;
                // 存储选中信息--start
                this.setSessionStore("busCustomerManagerStoreForm", this.storeForm);
                var otherVal = {
                    "currentPage": this.pager.currentPage,
                    "clueId": clueId,
                    "scrollTop": this.$el.querySelector('.el-table__body-wrapper').scrollTop
                }
                this.setSessionStore("busCustomerManagerOtherVal", otherVal);
                // 存储选中信息--end
                window.location.href = '/bus/BusinessCustomer/viewCustomerInfo?clueId=' + clueId;
            },
            formatVisitTime(row) {
                function dateFtt(fmt, date) { //author: meizz
                    var o = {
                        "M+": date.getMonth() + 1,                 //月份
                        "d+": date.getDate(),                    //日
                        "h+": date.getHours(),                   //小时
                        "m+": date.getMinutes(),                 //分
                        "s+": date.getSeconds(),                 //秒
                        "q+": Math.floor((date.getMonth() + 3) / 3), //季度
                        "S": date.getMilliseconds()             //毫秒
                    };
                    if (/(y+)/.test(fmt))
                        fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
                    for (var k in o)
                        if (new RegExp("(" + k + ")").test(fmt))
                            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
                    return fmt;
                }

                return dateFtt("yyyy-MM-dd hh:mm", new Date(row.vistitTime));
            },
            //根据电销组查询电销总监
            getSaleList() {
                var param = {};
                param.orgId = this.searchForm.teleGorupId;
                console.info(param);
                axios.post('/business/busAllocation/getSaleList', param)
                    .then(function (response) {
                        var result = response.data;
                        console.info(result);
                        var table = result.data;
                        customerVM.teleSaleOptions = table;
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            //根据商务组查询商务经理
            getBusSaleList() {
                var param = {};
                param.orgId = this.searchForm.busGroupId;
                console.info(param);
                axios.post('/business/busCustomerManager/getSaleList', param)
                    .then(function (response) {
                        var result = response.data;
                        console.info(result);
                        var table = result.data;
                        customerVM.busSaleOptions = table;
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            //排序
            sort_change(column) {
                var sortField = "";
                var sortType = "";
                if (column.prop === 'appiontmentCreateTime') {
                    sortField = "a.create_Time";
                } else if (column.prop === 'reserveTime') {
                    sortField = "a.reserve_Time";
                } else if (column.prop === 'allocateTime') {
                    sortField = "a.allocate_Time";
                }
                if (column.order === 'descending') {
                    sortType = "desc";
                } else if (column.order === 'ascending') {
                    sortType = "asc";
                }
                this.searchForm.sortField = sortField;
                this.searchForm.sortType = sortType;
                this.searchTable();
            },
            toogleClick() {
                if (this.isShow) {
                    this.isShow = false
                } else {
                    this.isShow = true
                }
            },
            setSessionStore (name, content) {
                if (!name) return
                if (typeof content !== 'string') {
                content = JSON.stringify(content)
                }
                window.sessionStorage.setItem(name, content)
            },
            getSessionStore (name) {
                if (!name) return;
                var content = window.sessionStorage.getItem(name);
                if (typeof content == 'string') {
                    content = JSON.parse(content)
                }
                return content;
            },
            removeSessionStore (name) {
                if (!name) return
                return window.sessionStorage.removeItem(name)
            },
        },
        created() {
            // window.sessionStorage.clear(); // 点击侧边栏-清除所有cookie
            // 进入页面判断有是否有存储值
            if(!this.paginationShow){
                var storeVal = this.getSessionStore("busCustomerManagerStoreForm");
                var otherVal = this.getSessionStore("busCustomerManagerOtherVal");
                if(storeVal && otherVal){
                    this.searchForm = storeVal;
                    this.$set(this.pager,"currentPage",otherVal.currentPage);
                    this.storeId = otherVal.clueId;
                    this.scrollTop = otherVal.scrollTop;
                }
                // 取页数存储
                var localVal=localStorage.getItem('allChangePageSize')?parseInt(localStorage.getItem('allChangePageSize')):'';
                if(localVal){this.pager.pageSize = localVal;}
                if(ownOrgId){
                  this.isSWZDisabled= true;
                  var param = {};
                  param.orgId = ownOrgId;
                  console.info(param);
                  axios.post('/business/busCustomerManager/getSaleList', param)
                  .then(function (response) {
                    var result = response.data;
                    console.info(result);
                    var table = result.data;
                    customerVM.busSaleOptions = table;
                  })
                  .catch(function (error) {
                    console.log(error);
                  });
                }//商务总监商务组筛选按钮不可点击
            };
            console.info("create method");
            this.searchTable();

        },
        mounted() {
            document.getElementById('clueManage').style.display = 'block';
        }
    })

</script>
</html>